﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MPViz
{
    public partial class InputClassForm : Form
    {
        public string retStr;
        public InputClassForm()
        {
            InitializeComponent();
        }

        private void okBtn_Click(object sender, EventArgs e)
        {
            retStr = "";

            if (textBox1.Text != "") retStr += "\"" + textBox1.Text + "\" ";
            if (textBox2.Text != "") retStr += "\"" + textBox2.Text + "\" ";
            if (textBox3.Text != "") retStr += "\"" + textBox3.Text + "\" ";
            if (textBox4.Text != "") retStr += "\"" + textBox4.Text + "\" ";
            
            DialogResult = DialogResult.OK;
            Close();
        }

        private void detectEnter(object sender, KeyEventArgs e)
        {

            if (e.KeyCode == Keys.Enter)
            {
                retStr = "";

                if (textBox1.Text != "") retStr += "\"" + textBox1.Text + "\" ";
                if (textBox2.Text != "") retStr += "\"" + textBox2.Text + "\" ";
                if (textBox3.Text != "") retStr += "\"" + textBox3.Text + "\" ";
                if (textBox4.Text != "") retStr += "\"" + textBox4.Text + "\" ";
                DialogResult = DialogResult.OK;
                
                Close();
            }

        }

  
    }
}
